﻿@page "/Scheduler/ViewTypes/WorkWeekView"

<DemoPageSectionComponent Id="Scheduler-ViewTypes-WorkWeekView">
    <DemoChildContent>
        <DxScheduler @bind-StartDate="@StartDate"
                     DataStorage="@DataStorage"
                     CssClass="demo-sc-size">
            <DxSchedulerWorkWeekView ShowWorkTimeOnly="ShowWorkTimeOnly"></DxSchedulerWorkWeekView>
        </DxScheduler>
    </DemoChildContent>
    <OptionsContent>
        <OptionCheckBox T=bool Label="Show Work Time Only" @bind-Checked="ShowWorkTimeOnly" />
    </OptionsContent>

    @code {
        DateTime StartDate { get; set; } = DateTime.Today;
        bool ShowWorkTimeOnly { get; set; } = true;

        DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
            AppointmentsSource = AppointmentCollection.GetAppointments(),
            AppointmentMappings = new DxSchedulerAppointmentMappings() {
                Type = "AppointmentType",
                Start = "StartDate",
                End = "EndDate",
                Subject = "Caption",
                AllDay = "AllDay",
                Location = "Location",
                Description = "Description",
                LabelId = "Label",
                StatusId = "Status",
                RecurrenceInfo = "Recurrence"
            }
        };
    }
</DemoPageSectionComponent>
